import unittest

from ddt import ddt, file_data
from selenium import webdriver

from Page.Login import Login
from Page.test01 import test011
from Page.test02 import test021


@ddt
class ContractCase(unittest.TestCase):
    @classmethod
    def setUpClass(cls) -> None:
        cls.driver = webdriver.Chrome()
        cls.driver.maximize_window()
        cls.lg = Login(cls.driver)
        cls.sc = test011(cls.driver)
        cls.fr = test021(cls.driver)

    @classmethod
    def tearDownClass(cls) -> None:
        pass

    def test01(self):
        self.lg.login55()

    @file_data("../Data/test01.yaml")
    def test02(self, Number):
        self.sc.test0111(Number)

    @file_data("../Data/test02.yaml")
    def test02(self, Number):
        self.fr.test0211(Number)
